package com.milkyTea.Services;

import java.io.IOException;

import javax.servlet.ServletException;

import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.milkyTea.Dao.FooterDao;

import com.milkyTea.Util.BaseServlet;
@WebServlet("/footerServlet")
public class footerServlet extends BaseServlet {
	
       
	FooterDao dao=new FooterDao();
	
//   @Override
//	protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
//		// TODO Auto-generated method stub
//		req.setAttribute("homeinfo", dao.gethomeinfo());
//		//req.getRequestDispatcher("/footer.jsp").forward(req, resp);
//		req.getRequestDispatcher("/footer.jsp").include(req, resp);
//	}

@Override
protected void service(HttpServletRequest request, HttpServletResponse response)
		throws ServletException, IOException {
	
	request.setAttribute("homeinfo",dao.gethomeinfo());
	
	
	request.getRequestDispatcher("/footer.jsp").include(request, response);
   
}
}
